<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>外包工成本汇总</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnExport").click(function(){
				top.$.jBox.confirm("确认要导出外包工成本汇总数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/employee/outsourceCostDetail/exportTotal");
						$("#searchForm").submit();
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/employee/outsourceCostDetail/countOutsourceCost">外包工成本汇总表列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="outsourceCostDetail" action="${ctx}/employee/outsourceCostDetail/countOutsourceCost" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>员工编号：</label>
				<form:input path="employeenumber" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<%-- <li><label>国家：</label>
				<sys:treeselect id="company" name="company" value="${outsourceCostDetail.company.id}" labelName="${outsourceCostDetail.company.name}" labelValue="${outsourceCostDetail.company.id}"
					title="国家" url="/sys/office/treeData?type=1" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</li>
			<li><label>仓库：</label>
				<sys:treeselect id="office" name="office" value="${outsourceCostDetail.office.id}" labelName="${outsourceCostDetail.office.name}" labelValue="${outsourceCostDetail.office.id}"
					title="仓库" url="/sys/office/treeData?type=2" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</li> --%>
			<li><label>日期：</label>
				<input name="startDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${startDate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/> - 
				<input name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</li> 
			
			<li class="btns">
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
				<!-- <input id="btnExport" class="btn btn-primary" type="button" value="导出"/> -->
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>员工编号</th>
				<th>仓库</th>
				<th>国家</th>				
				<th>开始日期</th>
				<th>结束日期</th>
				<th>外包公司</th>
				<th>发薪工时</th>
				<th>平时工时</th>
				<th>平时工资</th>
				<th>加班工时</th>
				<th>加班工资</th>				
				<th>应发工资</th>
				<th>增值税</th>				
				<th>应付外包公司预提费用</th>				
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="outsourceCostDetail">
			<tr>
				<td>
					${outsourceCostDetail.number}
				</td>
				<td>
					${outsourceCostDetail.company.name}
				</td>
				<td>
					${outsourceCostDetail.office.name}
				</td>				
				<td>
					<fmt:formatDate value="${startDate}" pattern="yyyy-MM-dd"/>
					
				</td>
				<td>
					<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>					
				</td>
				<td>				
					${fns:getDictLabel(outsourceCostDetail.outsourcingCompany, 'outsourcing_company_type', '')}			
				</td>
				<td>
					${outsourceCostDetail.wageHour}
				</td>
				<td>
					${outsourceCostDetail.normalHour}
				</td>
				
				<td>
					${outsourceCostDetail.normalMoney}
				</td>
				<td>
					${outsourceCostDetail.overtimeHour}
				</td>
				<td>
					${outsourceCostDetail.overtimeMoney}
				</td>
				
				<td>
					${outsourceCostDetail.temporaryMoney}
				</td>
				<td>
					${outsourceCostDetail.temporaryMoney*outsourceCostDetail.addedTax}
				</td>
				<td>
					${outsourceCostDetail.outsourcingMoney}
				</td>		
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>